package com.sxjh.entity.result;

import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author zxz
 * @Date 2021/11/22
 * @Description:
 */
@Data
public class BalanceRepostResult {
    /**
     * 客户ID
     */
    public String companyId;
    /**
     * 客户名称
     */
    public String companyName;
    /**
     * 上月余额
     */
    public BigDecimal lastMonthBalance;
    /**
     * 现金汇款
     */
    public BigDecimal recordedMoney;
    /**
     * 承兑汇款
     */
    public BigDecimal acceptance;
    /**
     * 转账
     */
    public BigDecimal transfer;
    /**
     * 本月货款
     */
    public BigDecimal payment;
    /**
     * 结算月
     */
    public String settlementMonth;
    /**
     * 结算月
     */
    public Date createdAt;
    /**
     * 其他货款
     */
    public BigDecimal otherPayment;
    /**
     * 其他货款
     */
    public BigDecimal balance;
    /**
     * 火车货款
     */
    public BigDecimal trainPayment;
    /**
     * 实时余额
     */
    public BigDecimal customerCredit;

    public String updatedAt;

    public BigDecimal getLastMonthBalance() {
        if ("".equals(lastMonthBalance) || lastMonthBalance == null) {
            return new BigDecimal(0.00);//去除该属性的前后空格并进行非空非null判断
        }
        return lastMonthBalance;
    }

    public BigDecimal getRecordedMoney() {
        if ("".equals(recordedMoney) || recordedMoney == null) {
            return new BigDecimal(0.00);//去除该属性的前后空格并进行非空非null判断
        }
        return recordedMoney;
    }

    public BigDecimal getAcceptance() {
        if ("".equals(acceptance) || acceptance == null) {
            return new BigDecimal(0.00);//去除该属性的前后空格并进行非空非null判断
        }
        return acceptance;
    }

    public BigDecimal getTransfer() {
        if ("".equals(transfer) || transfer == null) {
            return new BigDecimal(0.00);//去除该属性的前后空格并进行非空非null判断
        }
        return transfer;
    }

    public BigDecimal getPayment() {
        if ("".equals(payment) || payment == null) {
            return new BigDecimal(0.00);//去除该属性的前后空格并进行非空非null判断
        }
        return payment;
    }

    public BigDecimal getOtherPayment() {
        if ("".equals(otherPayment) || otherPayment == null) {
            return new BigDecimal(0.00);//去除该属性的前后空格并进行非空非null判断
        }
        return otherPayment;
    }

    public BigDecimal getCustomerCredit() {
        if ("".equals(customerCredit) || customerCredit == null) {
            return new BigDecimal(0.00);//去除该属性的前后空格并进行非空非null判断
        }
        return customerCredit;
    }

    public BigDecimal getBalance() {
        if ("".equals(balance) || balance == null) {
            return new BigDecimal(0.00);//去除该属性的前后空格并进行非空非null判断
        }
        return balance;
    }

    public BigDecimal getTrainPayment() {
        if ("".equals(trainPayment) || trainPayment == null) {
            return new BigDecimal(0.00);//去除该属性的前后空格并进行非空非null判断
        }
        return trainPayment;
    }
}
